﻿<Window x:Class="FR.SAFTAnalyser.Views.SettingsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
        Icon="{StaticResource Settings}"
        Title="Opções" MinHeight="200" MinWidth="200" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="80" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Ficheiro SAFT:" Grid.Column="0"  Grid.Row="0" Margin="3"/>
        <TextBlock Text="Chave pública:" Grid.Column="0"  Grid.Row="1" Margin="3"/>
        <TextBlock Text="Chave privada:" Grid.Column="0"  Grid.Row="2" Margin="3"/>
        <TextBlock Text="Data mínima documentos:" Grid.Column="0"  Grid.Row="5" Margin="3"/>
        <TextBlock Text="Tamanho da letra:" Grid.Column="0"  Grid.Row="6" Margin="3"/>
        <TextBlock Text="Abrir só:" Grid.Column="0"  Grid.Row="8" Margin="3"/>
        
        <TextBlock Text="{Binding SAFTFileName, Mode=TwoWay}" Grid.Column="1"  Grid.Row="0" Margin="3"/>
        <TextBlock Text="{Binding PublicKeyFileName, Mode=TwoWay}" Grid.Column="1"  Grid.Row="1" Margin="3"/>
        <TextBlock Text="{Binding PrivateKeyFileName, Mode=TwoWay}" Grid.Column="1"  Grid.Row="2" Margin="3"/>
        
        <Button Content="..." Command="{Binding DoOpenSaftFileCommand}" Grid.Row="0" Grid.Column="2" Margin="3" Width="50" />
        <Button Content="..." Command="{Binding DoOpenPublicKeyFileCommand}" Grid.Row="1" Grid.Column="2" Margin="3" Width="50"/>
        <Button Content="..." Command="{Binding DoOpenPublicKeyFileCommand}" Grid.Row="2" Grid.Column="2" Margin="3" Width="50"/>

        <CheckBox Content="Abrir ficheiros automáticamente" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="3,3,10,3"
                  IsChecked="{Binding RememberLastOpenFiles, Mode=TwoWay}"/>

        <toolkit:IntegerUpDown Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="6" Margin="3"
                               Value="{Binding FontSize}"/>
        
        <DatePicker Grid.Row="5" Grid.Column="1" Margin="3" Grid.ColumnSpan="2"
                    SelectedDate="{Binding DataMinima}" />
        
        <toolkit:CheckListBox 
            Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Grid.Row="8"
            ItemsSource="{Binding AllSaftTables}"
            SelectedMemberPath="IsOpenByDefault"
            DisplayMemberPath="Description"/>
    </Grid>
</Window>
